% TEST_ID: LANG-EXPAND-0062
% CATEGORY: language/cell
% 测试Cell的构造

function test_cell_construct
    C = {'2017-08-16',[56 67 78]};
    C(2,:) = {'2017-08-17',[58 69 79]};
    C(3,:) = {'2017-08-18',[60 68 81]};


    expected_C = {
        '2017-08-16',[56 67 78]
        '2017-08-17',[58 69 79]
        '2017-08-18',[60 68 81]
    };

    checking = arrayfun(@(x, y) isequal(x{1}, y{1}), C, expected_C);
    assert(size(checking) == [3, 2])
    assert(checking)

    C = cell(3);
    assert(size(C) == [3, 3]);
    assert(arrayfun(@(x) isempty(x{1}), C))

    C = cell([4, 5]);
    assert(all(size(C) == [4, 5]));
    assert(all(arrayfun(@(x) isempty(x{1}), C)))

end

